package org.shop.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.shop.dao.ActivityInfoMapper;
import org.shop.entity.ActivityInfo;
import org.shop.service.ActivityInfoService;
import org.shop.service.base.BaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class ActivityInfoServiceImpl extends BaseServiceImpl<ActivityInfo, Long> implements ActivityInfoService{

	@Autowired
	private ActivityInfoMapper activityInfoMapper;
	
	@Override
	public Map<String, Object> getActivityInfoList(Map<String, Object> paramMap) {
		List<ActivityInfo> activityInfoList = activityInfoMapper.getActivityInfoList(paramMap);
        Integer count = activityInfoMapper.getActivityInfoCount(paramMap);
        //分页数据
        Map<String, Object> dataMap = new HashMap<String, Object>();
        dataMap.put("total", count);
        dataMap.put("rows", activityInfoList);
        return dataMap;
	}
	
	public List<ActivityInfo> getActivityList(Map<String, Object> params){
		return activityInfoMapper.getActivityInfoList(params);
	}
   
}